﻿package Message.Game
{
    import Framework.MQ.*;
    import Framework.Serialize.*;
    import Message.Public.*;

    public class SFriendReplyMsg extends IMessageBase
    {
        public var apply:SMiniPlayer;
        public var reply:SMiniPlayer;
        public var toPlayerId:int;
        public var result:int;
        public var type:int;
        public const _type:int = 15113;
        public static var _regist:SFriendReplyMsg = new SFriendReplyMsg(true);

        public function SFriendReplyMsg(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            return;
        }// end function

        override public function getType() : int
        {
            return this._type;
        }// end function

        override public function clone() : IMessageBase
        {
            return new SFriendReplyMsg();
        }// end function

        override public function __write(param1:SerializeStream) : void
        {
            this.apply.__write(param1);
            this.reply.__write(param1);
            param1.writeInt(this.toPlayerId);
            param1.writeInt(this.result);
            param1.writeInt(this.type);
            return;
        }// end function

        override public function __read(param1:SerializeStream) : void
        {
            this.apply = new SMiniPlayer();
            this.apply.__read(param1);
            this.reply = new SMiniPlayer();
            this.reply.__read(param1);
            this.toPlayerId = param1.readInt();
            this.result = param1.readInt();
            this.type = param1.readInt();
            return;
        }// end function

    }
}
